//
//  SMMoneyChatTableViewCell.m
//  SaveMoney
//
//  Created by user on 2018/11/22.
//  Copyright © 2018年 Sunflower. All rights reserved.
//

#import "SMMoneyChatTableViewCell.h"


#import "NSString+NCDate.h"
#import "NSDate+GFCalendar.h"
#import "AdaptiveHeader.h"

@interface SMMoneyChatTableViewCell ()



@end

@implementation SMMoneyChatTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.calenderView =[[LXCalendarView alloc]initWithFrame:CGRectMake(20, 0, Device_Width - 40, 0)];
    
    self.calenderView.currentMonthTitleColor =[UIColor hexStringToColor:@"2c2c2c"];
    self.calenderView.lastMonthTitleColor =[UIColor hexStringToColor:@"8a8a8a"];
    self.calenderView.nextMonthTitleColor =[UIColor hexStringToColor:@"8a8a8a"];
    
    self.calenderView.isHaveAnimation = YES;
    
    self.calenderView.isCanScroll = YES;
    self.calenderView.isShowLastAndNextDate = NO;
    
    self.calenderView.isShowLastAndNextBtn = YES;
    
    self.calenderView.todayTitleColor =[UIColor purpleColor];
    
    self.calenderView.selectBackColor =[UIColor blueColor];
    
    self.calenderView.backgroundColor =[UIColor whiteColor];
    
    [self.contentView addSubview:self.calenderView];
    
    KViewBorderRadius(self.calenderView, SBScaleNumber(10), SBScaleNumber(2), [UIColor hexStringToColor:@"0077FF"]);

//    NSDate *starDate = [NSString dateFromTimeStr:@"2018-11-08"];
//    NSArray *alldate = [starDate getAllDateWithDifferenceByDate:@"2019-02-02"];
//    NSMutableArray *array = [[NSMutableArray alloc] init];
//    for (NSDate *obj in alldate) {
//        LXCalendarDayModel *model = [[LXCalendarDayModel alloc] init];
//        model.year = obj.dateYear;
//        model.month = obj.dateMonth;
//        model.day = obj.dateDay;
//        [array addObject:model];
//    }
//    self.calenderView.saveDataArray = array;
    
    [self.calenderView dealData];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
